<?php

class Model_Aposinitnew {
	
	public static function initProStock($shop){
	
		$proSk =  new Model_DbTable_Apos_Stock_Balanceold(Zend_Registry::get('db_allapos'));
		
		return $proSk;
	
	}
	
	public static function initPaytype($shop){
		
		$payType = new Model_DbTable_Apos_Paytype_Paytypeold(Zend_Registry::get('db_allapos'));
		
		return $payType;
	}
	
	public static function initProDes(){
		
		$proDes = new Model_DbTable_Apos_Stock_Productdes(Zend_Registry::get('db_allapos'));
		return $proDes;
	}
	
	public static function initProBalanceAll(){
		$proSk =  new Model_DbTable_Apos_Stock_Balanceold(Zend_Registry::get('db_allapos'));
		
		return $proSk;
	}
	
	public static function initProDesNewApos(){
	
		$proDes = new Model_DbTable_Apos_Stock_Productdes(Zend_Registry::get('db_allapos'));
		return $proDes;
	}

	
	public static function initAposInvoice($shop){
	
		$invOld = "";
	
		if($shop == "CBPC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Cbpc(Zend_Registry::get('db_allapos'));
		}
		if($shop == "BSXP"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Bsxp(Zend_Registry::get('db_allapos'));
		}
		if($shop == "CBIC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Cbic(Zend_Registry::get('db_allapos'));
		}
		if($shop == "FGIC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Fgic(Zend_Registry::get('db_allapos'));
		}
		if($shop == "HPIC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Hpic(Zend_Registry::get('db_allapos'));
		}
		if($shop == "PMIC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Pmic(Zend_Registry::get('db_allapos'));
		}
		if($shop=="WBPC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Wbpc(Zend_Registry::get('db_allapos'));
		}	
		if($shop=="BHPC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Bhpc(Zend_Registry::get('db_allapos'));
		}
		if($shop=="NLPC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Nlpc(Zend_Registry::get('db_allapos'));
		}
		if($shop=="CLPC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Clpc(Zend_Registry::get('db_allapos'));
		}
		if($shop=="WGPC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Wgpc(Zend_Registry::get('db_allapos'));
		}
		if($shop=="WBIC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Wbic(Zend_Registry::get('db_allapos'));
		}
		if($shop=="BBPC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Bbpc(Zend_Registry::get('db_allapos'));
		}
		if($shop=="EPIC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Epic(Zend_Registry::get('db_allapos'));
		}
		if($shop=="WLIC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Wlic(Zend_Registry::get('db_allapos'));
		}
		if($shop=="KCPC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Kcpc(Zend_Registry::get('db_allapos'));
		}
		if($shop=="PMPC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Pmpc(Zend_Registry::get('db_allapos'));
		}
		if($shop=="BSIC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Bsic(Zend_Registry::get('db_allapos'));
		}
		if($shop=="BSPC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Bspc(Zend_Registry::get('db_allapos'));
		}
		if($shop=="SLIC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Slic(Zend_Registry::get('db_allapos'));
		}
		if($shop=="ADPC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Adpc(Zend_Registry::get('db_allapos'));
		}
		if($shop=="WGIC"){
			$invOld = new Model_DbTable_Apos_Newinvoice_Wgic(Zend_Registry::get('db_allapos'));
		}
		return $invOld;
	}
	
	public static function initAposStaff($shop){
	
		if($shop == "CBPC"){
			$aStaff = new Model_DbTable_Apos_Sales_Cbpc(Zend_Registry::get('db_allapos'));
		}
		if($shop == "BSXP"){
			$aStaff = new Model_DbTable_Apos_Sales_Bsxp(Zend_Registry::get('db_allapos'));
		}
		if($shop == "CBIC"){
			$aStaff = new Model_DbTable_Apos_Sales_Cbic(Zend_Registry::get('db_allapos'));
		}
		if($shop == "FGIC"){
			$aStaff = new Model_DbTable_Apos_Sales_Fgic(Zend_Registry::get('db_allapos'));
		}
		if($shop == "HPIC"){
			$aStaff = new Model_DbTable_Apos_Sales_Hpic(Zend_Registry::get('db_allapos'));
		}
		if($shop == "PMIC"){
			$aStaff = new Model_DbTable_Apos_Sales_Pmic(Zend_Registry::get('db_allapos'));
		}
		if($shop=="WBPC"){
			$aStaff = new Model_DbTable_Apos_Sales_Wbpc(Zend_Registry::get('db_allapos'));
		}
		if($shop=="BHPC"){
			$aStaff = new Model_DbTable_Apos_Sales_Bhpc(Zend_Registry::get('db_allapos'));
		}
		if($shop=="NLPC"){
			$aStaff = new Model_DbTable_Apos_Sales_Nlpc(Zend_Registry::get('db_allapos'));
		}
		if($shop=="CLPC"){
			$aStaff = new Model_DbTable_Apos_Sales_Clpc(Zend_Registry::get('db_allapos'));
		}
		if($shop=="WGPC"){
			$aStaff = new Model_DbTable_Apos_Sales_Wgpc(Zend_Registry::get('db_allapos'));
		}
		if($shop=="WBIC"){
			$aStaff = new Model_DbTable_Apos_Sales_Wbic(Zend_Registry::get('db_allapos'));
		}
		if($shop=="BBPC"){
			$aStaff = new Model_DbTable_Apos_Sales_Bbpc(Zend_Registry::get('db_allapos'));
		}
		if($shop=="EPIC"){
			$aStaff = new Model_DbTable_Apos_Sales_Epic(Zend_Registry::get('db_allapos'));
		}
		if($shop=="WLIC"){
			$aStaff = new Model_DbTable_Apos_Sales_Wlic(Zend_Registry::get('db_allapos'));
		}
		if($shop=="KCPC"){
			$aStaff = new Model_DbTable_Apos_Sales_Kcpc(Zend_Registry::get('db_allapos'));
		}
		if($shop=="PMPC"){
			$aStaff = new Model_DbTable_Apos_Sales_Pmpc(Zend_Registry::get('db_allapos'));
		}
		if($shop=="BSIC"){
			$aStaff = new Model_DbTable_Apos_Sales_Bsic(Zend_Registry::get('db_allapos'));
		}
		if($shop=="BSPC"){
			$aStaff = new Model_DbTable_Apos_Sales_Bspc(Zend_Registry::get('db_allapos'));
		}
		if($shop=="SLIC"){
			$aStaff = new Model_DbTable_Apos_Sales_Slic(Zend_Registry::get('db_allapos'));
		}
		if($shop=="ADPC"){
			$aStaff = new Model_DbTable_Apos_Sales_Adpc(Zend_Registry::get('db_allapos'));
		}
		if($shop=="WGIC"){
			$aStaff = new Model_DbTable_Apos_Sales_Wgic(Zend_Registry::get('db_allapos'));
		}
		
		return $aStaff;
	}
	
	
	public static function initAposInvPro($shop){
	
		$invPro = "";
	
		if($shop == "CBPC"){
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Cbpc(Zend_Registry::get('db_allapos'));
		}
		if($shop == "CBIC"){
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Cbic(Zend_Registry::get('db_allapos'));
		}
		if($shop == "BSXP"){
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Bsxp(Zend_Registry::get('db_allapos'));
		}
		if($shop == "FGIC"){
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Fgic(Zend_Registry::get('db_allapos'));
		}
		if($shop == "HPIC"){
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Hpic(Zend_Registry::get('db_allapos'));
		}
		if($shop == "PMIC"){
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Pmic(Zend_Registry::get('db_allapos'));
		}
		if($shop == "WBPC"){
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Wbpc(Zend_Registry::get('db_allapos'));
		}
			
		if($shop == "BHPC"){
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Bhpc(Zend_Registry::get('db_allapos'));
		}
		if($shop == "NLPC"){
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Nlpc(Zend_Registry::get('db_allapos'));
		}
		if($shop == "CLPC"){
		
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Clpc(Zend_Registry::get('db_allapos'));
		}
		if($shop == "WGPC"){
		
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Wgpc(Zend_Registry::get('db_allapos'));
		}
		if($shop == "WBIC"){
		
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Wbic(Zend_Registry::get('db_allapos'));
		}
		if($shop == "BBPC"){
		
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Bbpc(Zend_Registry::get('db_allapos'));
		}
		if($shop == "EPIC"){
		
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Epic(Zend_Registry::get('db_allapos'));
		}
		if($shop == "WLIC"){
		
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Wlic(Zend_Registry::get('db_allapos'));
		}
		if($shop == "KCPC"){
		
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Kcpc(Zend_Registry::get('db_allapos'));
		}
		if($shop == "PMPC"){
		
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Pmpc(Zend_Registry::get('db_allapos'));
		}
		if($shop == "BSIC"){
		
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Bsic(Zend_Registry::get('db_allapos'));
		}
		if($shop == "BSPC"){
		
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Bspc(Zend_Registry::get('db_allapos'));
		}
		if($shop == "SLIC"){
		
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Slic(Zend_Registry::get('db_allapos'));
		}
		if($shop == "ADPC"){
		
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Adpc(Zend_Registry::get('db_allapos'));
		}
		if($shop == "WGIC"){
		
			$invPro = new Model_DbTable_Apos_Newinvoice_Products_Wgic(Zend_Registry::get('db_allapos'));
		}
	
		return $invPro;
	}
	
	public static function initKtData ($shop){
		
		$ktData = new Model_DbTable_Apos_Stock_Ktdataold(Zend_Registry::get('db_allapos'));
		
		return $ktData;
	}
	
	public static function initKaData ($shop){

		$kaData = new Model_DbTable_Apos_Stock_Kadataold(Zend_Registry::get('db_allapos'));
		
		return $kaData;		
	}
	
}

?>